decodeResponse parses error locations